<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
</head>
<body>
<script>
    function log() {
        document.body.appendChild(document.createTextNode(Array.prototype.join.call(arguments, ", ") + "\n"));
        console.log.apply(console, arguments);
    }

    window.onerror = function(err) {
        log("Error", err);
    };
    navigator.serviceWorker.register("serviceWorker.js", {
        scope: "./"
    }).then(function(sw) {
        log("Registered serviceWorker, attempting to claim the page");
        window.location.reload();
    }).catch(function(err) {
        log("Error loading the serviceWorker", err);
    });

</script>
</body>
</html>